<template lang="pug">
  div#app
    transition
      .nav(v-if="$store.state.isShow")
        div
          p
            span(class="iconfont icon-shouye")
            router-link(to="/home") 首页 
        div
          p
            span(class="iconfont icon-xuanxiang")
            router-link(to="/about") 分类 
        div
          p
            span(class="iconfont icon-xingqiu")
            router-link(to="/xq") 米圈  
        div
          p
            span(class="iconfont icon-gouwuche")
            router-link(to="/shopping") 购物车  
        div
          p
            span(class="iconfont icon-profile")
            router-link(to="/user") 用户    
    router-view(:titleSize="titleSize")
</template>
<script>
export default {
  data(){
    return {
      titleSize:['推荐','手机','智能','电视','家电','笔记本']
    }
  },
  created(){
    // this.$http.get('http://192.168.43.168:8082/user/add-addren',{
    //   params:{
    //     'buyer_name': '邓景良',
    //     'buyer_phone': '18333107892',
    //     'buyer_address': '北京 昌平',
    //     'area_code': '南口'
    //   }
    // }).then(val=>{
    //   console.log(val)
    // })
  }
};
</script>
<style lang="sass">
.nav
  position: fixed
  bottom: 0
  left: 0
  height: .52rem
  width: 100%
  display: flex
  align-items: center
  justify-content: space-around
  box-shadow: 0 3px 14px 2px rgb(0 0 0 / 12%)
  background: #fff
  z-index: 2
  p
    display: flex
    flex-direction: column
    align-items: center
    span
      font-size: .20rem
      margin-bottom: .02rem
    a
      color: #999
      font-size: .12rem
      &.router-link-active 
        color:#ff6700
.v-enter
  transform: translateY(100%)
.v-enter-active
  transition: .5s
.v-leave-to
  transform: translate(-100% )
.v-leave-active
  transition: .5s
</style>
